package net.oschina.app.com.testcase.others;

import android.test.ActivityInstrumentationTestCase2;
import android.view.View;
import android.widget.TextView;

import com.robotium.solo.Solo;

import net.oschina.app.AppStart;
import net.oschina.app.BasicTest;
import net.oschina.app.SoloWrap;

/**
 * Created by Administrator on 2018/3/8.
 */

public class IDTest extends BasicTest {


    public void testName() throws Exception {
        View view =  solo1.getView("net.oschina.app:id/tv_title",1);
        int width = view.getWidth();
        int height=view.getHeight();
        int x=width/2;
        int[] xy=new int[2];
        view.getLocationOnScreen(xy);
        int y=height/2+xy[1];
        solo1.clickOnScreen(x,y);
        solo1.sleep(5000);

    }


}
